package initialize

import (
	"github.com/gin-gonic/gin"
	"go.uber.org/zap"
	"jms/middleware"
	router2 "jms/router"
)

func InitRouter() *gin.Engine {
	router := gin.Default()
	//配置跨域
	router.Use(middleware.Cors())
	ApiGroup := router.Group("/u/v1")
	router2.InitUserRouter(ApiGroup)
	router2.InitShopRouter(ApiGroup)
	zap.S().Info("初始化路由")
	return router
}
